<%@page import="javax.portlet.WindowState"%>
<%@page import="javax.portlet.PortletMode"%>
<%@ include file="../init.jsp" %>


<div id="portlet_1" class="portlet">
	<h3 class="handle">
		<portal:portletTitle />
		<span class="action">
		<img src="img/portlet/options.png" alt="options" />
			<span class="button">
			<%
 			if (((PortletHolder) pageContext.getAttribute(Constant.session_portlet_bean)).isWindowStateAllowed("maximized") &&
 					!((PortletHolder) pageContext.getAttribute(Constant.session_portlet_bean)).getWindowState().equals(WindowState.MAXIMIZED)) 
	 				{
	 		%> <a href='<portal:state state="maximized"/>'><img src="img/portlet/maximize.png" alt="maximized" /> </a>&nbsp; 
			<%
	 			}
	 		%>
			</span>
			<span class="button"> 
			<%
 			if (((PortletHolder) pageContext.getAttribute(Constant.session_portlet_bean)).isWindowStateAllowed("normal") &&
 					!((PortletHolder) pageContext.getAttribute(Constant.session_portlet_bean)).getWindowState().equals(WindowState.NORMAL)) 
	 				{
	 		%> <a href='<portal:state state="normal"/>'><img src="img/portlet/minimize.png" alt="normal" /> </a>&nbsp; 
			<%
	 			}
	 		%>
			</span>
			<span class="button"> 
			<%
 			if (((PortletHolder) pageContext.getAttribute(Constant.session_portlet_bean)).isWindowStateAllowed("minimized") &&
 					!((PortletHolder) pageContext.getAttribute(Constant.session_portlet_bean)).getWindowState().equals(WindowState.MINIMIZED)) 
	 				{
	 		%> <a href='<portal:state state="minimized"/>'><img src="img/portlet/minimize.png" alt="minimized" /> </a>&nbsp; 
			<% } %>
			</span>
		</span>
		
		<span class="action">
		<img src="img/portlet/configuration.png" alt="configuration" />
			<span class="button">
			<%
	 			if (((PortletHolder) pageContext.getAttribute(Constant.session_portlet_bean)).isPortletModeAllowed("EDIT") &&
	 					!((PortletHolder) pageContext.getAttribute(Constant.session_portlet_bean)).getPortletMode().equals(PortletMode.EDIT)) 
	 				{
	 		%> <a href='<portal:mode mode="edit"/>'><img src="img/portlet/edit.png" alt="edit" /> </a>&nbsp; 
			<%
	 			}
	 		%>
			</span>
			<span class="button"> 
			<%
	 			if (((PortletHolder) pageContext.getAttribute(Constant.session_portlet_bean)).isPortletModeAllowed("HELP") &&
	 					!((PortletHolder) pageContext.getAttribute(Constant.session_portlet_bean)).getPortletMode().equals(PortletMode.HELP)) 
	 				{
	 		%> <a href='<portal:mode mode="help"/>'><img src="img/portlet/help.png" alt="help" /> </a>&nbsp; 
			<%
	 			}
	 		%>
			</span>
			<span class="button"> 
			<%
	 			if (((PortletHolder) pageContext.getAttribute(Constant.session_portlet_bean)).isPortletModeAllowed("VIEW") &&
	 					!((PortletHolder) pageContext.getAttribute(Constant.session_portlet_bean)).getPortletMode().equals(PortletMode.VIEW)) 
	 				{
	 		%> <a href='<portal:mode mode="view"/>'><img src="img/portlet/back.png" alt="view" /> </a>&nbsp; 
			<% } %>
			</span>
		</span>
	</h3>
	
	<% if (!((PortletHolder) pageContext.getAttribute(Constant.session_portlet_bean)).getWindowState().equals(WindowState.MINIMIZED))
		 { %>
	<div class="content" style="">
		<portal:portletContent />
	</div>
	<% } %>
</div>
